imageware
Class FMath

java.lang.Object
  extended by imageware.FMath

public final class FMath
extends java.lang.Object

Class FMath. The FMath class provides methods for carrying out a number of elementary mathematical operations.


Constructor Summary
FMath()
           
 
Method Summary
static int ceil(double d)
          Returns the smallest integral value that is not less than the argument.
static int ceil(float f)
          Returns the smallest integral value that is not less than the argument.
static int floor(double d)
          Returns the largest integral value that is not greater than the argument.
static int floor(float f)
          Returns the largest integral value that is not greater than the argument.
static double max(double d1, double d2)
          Returns the maximum value of the two arguments.
static float max(float f1, float f2)
          Returns the minimum value of the two arguments.
static double min(double d1, double d2)
          Returns the minimum value of the two arguments.
static float min(float f1, float f2)
          Returns the minimum value of the two arguments.
static int round(double d)
          Returns the integral value closest to the argument.
static int round(float f)
          Returns the integral value closest to the argument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FMath

public FMath()
Method Detail

floor

public static int floor(float f)
Returns the largest integral value that is not greater than the argument. If the argument value is already equal to a mathematical integer, then the result is the same as the argument. Note that the method works only for float values that fall within the range spanned by the integers. In that case, this method gives the same result as the corresponding method in Java's Math class, but is in general much faster.


floor

public static int floor(double d)
Returns the largest integral value that is not greater than the argument. If the argument value is already equal to a mathematical integer, then the result is the same as the argument. Note that the method works only for double values that fall within the range spanned by the integers. In that case, this method gives the same result as the corresponding method in Java's Math class, but is in general much faster.


ceil

public static int ceil(float f)
Returns the smallest integral value that is not less than the argument. If the argument value is already equal to a mathematical integer, then the result is the same as the argument. Note that the method works only for float values that fall within the range spanned by the integers. In that case, this method gives the same result as the corresponding method in Java's Math class, but is in general much faster.


ceil

public static int ceil(double d)
Returns the smallest integral value that is not less than the argument. If the argument value is already equal to a mathematical integer, then the result is the same as the argument. Note that the method works only for double values that fall within the range spanned by the integers. In that case, this method gives the same result as the corresponding method in Java's Math class, but is in general much faster.


round

public static int round(float f)
Returns the integral value closest to the argument. Note that the method works only for float values that fall within the range spanned by the integers. In that case, this method gives the same result as the corresponding method in Java's Math class, but is in general much faster.


round

public static int round(double d)
Returns the integral value closest to the argument. Note that the method works only for double values that fall within the range spanned by the integers. In that case, this method gives the same result as the corresponding method in Java's Math class, but is in general much faster.


min

public static float min(float f1,
                        float f2)
Returns the minimum value of the two arguments.


min

public static double min(double d1,
                         double d2)
Returns the minimum value of the two arguments.


max

public static float max(float f1,
                        float f2)
Returns the minimum value of the two arguments.


max

public static double max(double d1,
                         double d2)
Returns the maximum value of the two arguments.